<template>
    <div class="page">
        <nav-bar title="我的推广码" @click-left="$router.back()"></nav-bar>
        <div class="con">
            <div class="code">{{inviterCode}}</div>
            <div class="butt" v-clipboard:copy="inviterCode">点击复制</div>
        </div>
    </div>
</template>

<script>

import { Divider } from 'vant';

export default {
    data() {
        return {
            inviterCode: "",
        }
    },

    created() {
        this.prepareData();
    },

    methods: {

        prepareData() {
            this.$http.serverInviteCode().then(respData => {
                this.inviterCode = respData
            });
        },
    }
}
</script>

<style lang="scss" scoped>
@import "@/assets/color.scss";
.page {
    text-align: center;
    .code {
        padding: 100px 0 0 0;
    }
}
</style>